package com.hn.birthdaymatch.result;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @author Ts-SuSu
 * @date 2023/7/4 15:58
 * @description 全局分页统一返回结果
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "全局分页统一返回结果-PageResult")
public class PageResult<T> implements Serializable {
    private static final long serialVersionUID = -275582248840137389L;

    @ApiModelProperty("总数")
    private Long count;

    @ApiModelProperty("是否成功：0 成功、1 失败")
    private int code;

    @ApiModelProperty("当前页结果集")
    private List<T> data;
}
